<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base target="_self">
    <title>修改学童安排</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="修改,学童,安排">
	<meta http-equiv="description" content="This is my page">

	<style type="text/css">
	</style>

  </head>
  
  <body>
    <center>
    	<s:form name="frm" id="frm" method="post" action="" namespace="">
    		<jsp:include page="/jsp/outward/business/common/menuLink.jsp">
    			<jsp:param name="menuLink" value="[{'name':'学童管理'},{'name':'修改学童安排'}]"/>
    			<jsp:param name="width" value="70%"/>
    		</jsp:include>
    		
    		<s:hidden name="ca.id" id="childArrangeId"></s:hidden>
    		<s:hidden name="ca.child.id" id="childId"></s:hidden>
    		
    		<table width="100%" cellspacing="1" cellpadding="3" bgcolor="#CCCCCC">
    			<tr bgcolor="#FFFFFF">
    				<td width="20%" align="right" class="label">
    					日期：
    				</td>
    				<td width="80%" align="left">
    					<input name="ca.arrangeDate" id="arrangeDate" value="<s:date name='ca.arrangeDate' format='yyyy-MM-dd' />" style="width:100%" readonly="readonly" />
    				</td>
    			</tr>
    			<tr bgcolor="#FFFFFF">
    				<td align="right" class="label">
    					标题：
    					<br>
    					<font color="red">(20字以内)</font>
    				</td>
    				<td align="left">
    					<s:textfield name="ca.title" id="title" cssStyle="width:100%" maxlength="20"></s:textfield>
    				</td>
    			</tr>
    			<tr bgcolor="#FFFFFF">
    				<td align="right" class="label">
    					描述：
    					<br>
    					<font color="red">(200字以内)</font>
    				</td>
    				<td align="left">
    					<s:textarea name="ca.description" id="description" cssStyle="width:100%; height:120px;"></s:textarea>
    				</td>
    			</tr>
    		</table>
    		
    		<table width="100%" cellspacing="0">
    			<tr>
    				<td align="center" valign="bottom" height="30">
    					<input type="button" value="修改" class="btn" onclick="updateChildArrange()" />
    				</td>
    			</tr>
    		</table>
    		
    		
    	</s:form>
    </center>
    
    <script type="text/javascript">
    function updateChildArrange()
    {
    	var title = $('#title');
    	var description = $('#description');
    	if(!isNotNull(title.val()))
    	{
    		showMsg('标题不能为空。', function(){title.focus();});
    		return;
    	}
    	if(description.val().length > 200)
    	{
    		showMsg('描述不能超过200字。', function(){description.focus();});
    		return;
    	}
    	var url = 'inner/common/updateChildArrange.action';
    	ajaxAction(url, 'post', 'frm', true, function(result){
   			window.returnValue = result;
   			window.close();
    	});
    }
    </script>
  </body>
</html>
